*******************************
Compiling mdAddrPHPWrapper.cpp
*******************************

You may need to recompile mdAddrPHPWrapper.cpp if you are not using a version of PHP that is compatible with the php_mdAddrPHPWrapper.dll that is supplied. 

Prerequisites:
	
	Visual C++ Compiler
	PHP Binary installed (tested with PHP 5.2.6)
	PHP Source Code (tested with PHP 5.2.6)


To compile mdAddrPHPWrapper.cpp, a bat file has been supplied. This bat file requires the Visual Studio C++ compiler. To use the compiler, you must set up its environment by executing vcvars32.bat in the Visual Studio C++ bin folder.
For 64-bit use Visual Studio Command Prompt x64 and  Read the comments at the top of BuildWrapper.bat for more details.


You must then set the path to the PHP Include and Library path. You also need to set the path of the Address Object library (mdAddr.dll). The default locations of these files are set for 32-bit but may require changes if your system is different.
* 64bit version available in C:\Program Files\Melissa DATA\DQT\AddrObj\dll_64bit

set mdAddrPath to location of mdAddr.dll
set PHPIncludePath1 to location of PHP Source Zend Directory
set PHPIncludePath2 to location of PHP Source Win32Directory
set PHPIncludePath3 to location of PHP Source TSRMDirectory
set PHPIncludePath4 to location of PHP Source Main Directory
set PHPIncludePath5 to location of PHP Source Directory
set PHPLibraryPath to location of PHP Binary Dev Directory (contains php5ts.lib)

You will also need to change the PHP dependency that the code needs based on your version of PHP. In BuildWrapper.bat, you will need to change the following to match your installation of PHP:

	-DEFAULTLIB:php5ts.lib

phpXts.lib should be in your PHP\dev directory. For example, if you are using PHP 4 , you will change to:

	-DEFAULTLIB:php4ts.lib


Now, you can run BuildWrapper.bat to create php_mdAddrPHPWrapper.dll.


*****
Note: 
*****

If when running BuildWrapper.bat, you get a series or errors containing "cannot allocate an array of constant size 0," you are likely trying to compile with Visual C++ 8 (Visual Studio 2005). 

There appears to be a bug in the PHP source code relating to Visual Studio 2005 that is not present in Visual Studio 2003. Please try compiling with Visual C++ 7 or earlier. Or, you can go into php/main/config.w32.h and comment out these two lines:

#define _USE_32BIT_TIME_T 1
#define HAVE_STDLIB_H 1
